import 'package:get/get.dart';
import 'dart:math';

const avatarList = [
  'https://pic3.zhimg.com/v2-249fd5c1ff1151cce9b21131398233ae_xs.jpg',
  'https://pic3.zhimg.com/412f53f23bdc46e18f36438d754fae89_xs.jpg',
  'https://pic1.zhimg.com/v2-5c14acce702c37a59bd637f0d1e08972_xs.jpg',
  'https://pic1.zhimg.com/v2-a119b8aa8da241f442b31d029b8f2313_xs.jpg',
  'https://pica.zhimg.com/v2-68ad6d58449a6130dbdb3461304efc1c_xs.jpg',
  'https://pic1.zhimg.com/v2-28885054eb71faff1301cf756a8cca18_xs.jpg',
  'https://pica.zhimg.com/v2-58ef481c290cf9580a5efcc926c8c5a5_xs.jpg'
];

const sentenceList = [
  '鸾尾花繁盛如昔',
  '盛夏幻灭的身影',
  '原来真正的凋零是安静',
  '天空缓慢的浮云',
  '飘散寂寞的眼底',
  '没有比最初最难以忘记',
  '如果这夏季',
  '一个人飘零',
  '走在成片树叶投射的阴影里',
  '陌生的熟悉',
  '听所有回忆随风散去',
  '那梦一样的场景',
  '每个人微笑致意',
  '为何最终扑向离散而去',
  '这条路蜿蜒哪里',
  '能有个归途歇息',
  '没有比结束更难的结局',
  '如果这爱情',
  '一个人飘零',
  '徘徊在只属于青春那些情绪',
  '最后的决定',
  '让全部心意洒在心底',
  '以为发生的事情',
  '其实从没有痕迹',
  '以为爱过的人却',
  '永远的爱着你',
  '如果这爱情',
  '一个人飘零',
  '徘徊在只属于青春那些情绪',
  '最后的决定',
  '让全部心意洒在心底',
  '那就让全部的温柔埋在心底'
];

T oneOf<T>(List<T> list) {
  final index = Random().nextInt(list.length);
  return list[index];
}

class Todo {
  String avatar = oneOf(avatarList);
  String title;
  String description;

  Todo(this.title, this.description);
}

class TodoController extends GetxController {
  RxList<Todo> todos = (List<Todo>.from([])).obs;

  add(todo) {
    todos.add(todo);
  }
}

class Cat {
  String? name;
  int? age;

  Cat({this.name, this.age});
}

final c = Cat(name: "tt", age: 20);
